package com.x.erp.model;

import com.x.framework.annotation.MappingColumn;
import com.x.framework.annotation.MappingTable;
import com.x.framework.model.BaseObject;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 延保合同
 */
@MappingTable(tableName = "ERP_INSURANCE_CONTRACT")
public class InsuranceContract extends BaseObject {

	private static final long serialVersionUID = -143916527729156461L;

	@MappingColumn(columnName = "CONTRACT_ID", columnPk = true, columnLength = 32)
	private String contractId;// 延保合同Id

	@MappingColumn(columnName = "CONTRACT_NO")
	private String contractNo;// 延保合同编号

	@MappingColumn(columnName = "CONTRACT_RECEIPT_NUM")
	private String contractReceiptNum;// 收款凭证号

	@MappingColumn(columnName = "CONTRACT_IMAGE_URL")
	private String contractImageUrl;// 延保合同图片地址

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@MappingColumn(columnName = "CONTRACT_CREATE_TIME")
	private Date contractCreateTime;// 创建时间

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@MappingColumn(columnName = "CONTRACT_UPDATE_TIME")
	private Date contractUpdateTime;// 修改时间

	@MappingColumn(columnName = "USER_ID")
	private String userId;// 用户Id

	@MappingTable(tableName = "ERP_INSURANCE_ORDER")
	private List<InsuranceOrder> orderList;

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public String getContractNo() {
		return contractNo;
	}

	public void setContractNo(String contractNo) {
		this.contractNo = contractNo;
	}

	public String getContractReceiptNum() {
		return contractReceiptNum;
	}

	public void setContractReceiptNum(String contractReceiptNum) {
		this.contractReceiptNum = contractReceiptNum;
	}

	public String getContractImageUrl() {
		return contractImageUrl;
	}

	public void setContractImageUrl(String contractImageUrl) {
		this.contractImageUrl = contractImageUrl;
	}

	public Date getContractCreateTime() {
		return contractCreateTime;
	}

	public void setContractCreateTime(Date contractCreateTime) {
		this.contractCreateTime = contractCreateTime;
	}

	public Date getContractUpdateTime() {
		return contractUpdateTime;
	}

	public void setContractUpdateTime(Date contractUpdateTime) {
		this.contractUpdateTime = contractUpdateTime;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public List<InsuranceOrder> getOrderList() {
		return orderList;
	}

	public void setOrderList(List<InsuranceOrder> orderList) {
		this.orderList = orderList;
	}
}
